import { instance as request } from "@/utils/request";
export const login = (data?: any) => {
  return request<any, any>({
    method: "POST",
    url: "/login",
    data: data,
  });
};
//1
export const register = (data?: any) => {
  return request<any, any>({
    method: "POST",
    url: "/register",
    data: data,
  });
};

export const getUserList = (params?: any) => {
  return request<any, any>({
    method: "GET",
    url: "/getUserList",
    params: params,
  });
};

export const deleteUser = (params?: any) => {
  return request<any, any>({
    method: "GET",
    url: "/deleteUser",
    params: params,
  });
};

export const upload = (data?: any) => {
  return request<any, any>({
    method: "POST",
    url: "/upload",
    data: data,
  });
};

export const getUserDetail = (params?: any) => {
  return request<any, any>({
    method: "GET",
    url: "/getUserDetail",
    params: params,
  });
};

export const modifyUserInfo = (data?: any) => {
  return request<any, any>({
    method: "POST",
    url: "/modifyUserInfo",
    data: data,
  });
};

export const getPicList = (params?: any) => {
  return request<any, any>({
    method: "GET",
    url: "/getPicList",
    params: params,
  });
};

export const getPic = (params?: any) => {
  return request<any, any>({
    method: "GET",
    url: "/getPic",
    params: params,
  });
};

export const deletePic = (params?: any) => {
  return request<any, any>({
    method: "GET",
    url: "/deletePic",
    params: params,
  });
};
export const addPic = (data?: any) => {
  return request<any, any>({
    method: "POST",
    url: "/addPic",
    data: data,
  });
};
export const modifyPic = (data?: any) => {
  return request<any, any>({
    method: "POST",
    url: "/modifyPic",
    data: data,
  });
};

export const train = () => {
  return request<any, any>({
    method: "get",
    url: "/train",
  });
};

export const cudata = () => {
  return request<any, any>({
    method: "get",
    url: "/cudata",
  });
};
